#pragma once

#include<iostream>

float Calculate(float num1,float num2,char opera,char& stat)
{
    stat=0;
    switch(opera)
    {
        case '+':
            return num1+num2;
        case '-':
            return num1-num2;
        case '*': 
            return num1*num2;
        case '/':
            if(0==num2)
            {
                stat=2;
                return 0;
            }
            return num1/num2;
        defailt:
            stat=1;
            return 0;
    }

    return 0;
}